#include <iostream>
#include <cstdio>
#include <vector> 
#include <algorithm>

using namespace std; 

#define N 100001

struct player_t {
	int id; 
	int sc; 		// score
	int w; 
}; 

player_t a[2*N]; 
int k; 

bool cmp_w(player_t &a, player_t &b) 
{
	return a.sc==b.sc ? (a.id<b.id) : (a.sc>b.sc); 
}

int main()
{
	int i, j, n, r, q; 
	
	freopen("p1309_1.in", "r", stdin); 
	
	cin>>n>>r>>q; 
	for (i=0; i<2*n; i++) {
		a[k].id = i+1; 
		cin>>a[k].sc; 
		k++; 
	}
	for (i=0; i<2*n; i++) {
		cin>>a[i].w; 
	}
	sort(&a[0], &a[2*n], cmp_w); 
	for (j=0; j<r; j++) {
		for (i=0; i<2*n; i+=2) {
			if (a[i].w>a[i+1].w) {
				a[i].sc += 1; 
			} else {
				a[i+1].sc += 1; 
			}
		}
		sort(&a[0], &a[2*n], cmp_w); 
	}
	cout<<a[q-1].id<<"\n"; 
	return 0; 
}



